import java.util.Scanner;

/**
 * @author YuanBinbing
 * 输入ｘ的值用对应的算法，计算出ｙ的值；
 */
public class Task07_03 {
    public static void main(String[] args) {
        System.out.println("请输入一个值");
        Scanner scanner = new Scanner(System.in);
        int x = scanner.nextInt();
        int y;

        if(x>=3){
            y=2*x+1;
        }
        else if(x>=-1){
            y=2*x;
        }
        else{
            y=2*x-1;
        }
        System.out.println("x="+x+",y="+y);
    }
}
